import socket

client=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
ip_port=('127.0.0.1',8888)
while True:
    msg=input('Input the message to send: ')
    if msg == 'exit':
        break
    client.sendto(msg.encode(encoding='utf-8'),ip_port)
client.close()
